package wnhz.com.business.rebateshop.activity.sort;

import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.os.Message;
import android.view.WindowManager;

import butterknife.BindView;
import butterknife.ButterKnife;
import wnhz.com.business.R;
import wnhz.com.business.base.MyBaseActivity;
import wnhz.com.business.impl.ActionBarClickListener;
import wnhz.com.business.view.TranslucentActionBar;

public class GoodsTypeActivity extends MyBaseActivity implements ActionBarClickListener {
    @BindView(R.id.actionbar)
    TranslucentActionBar actionbar;
    private String title,cateId;

    @Override
    protected void handleMsg(Message msg) {

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_goods_type);
        paseIntent();
        ButterKnife.bind(this);

        actionbar.setData(title, R.drawable.ic_lefft_white, null, 0, null, 0, this);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            this.getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
            actionbar.setStatusBarHeight(getStatusBarHeight());
        }
    }

    private void paseIntent() {
        title = getIntent().getStringExtra("title");
        cateId = getIntent().getStringExtra("cateId");
    }

    public static Intent createIntent(Context context, String title, String cateId) {
        Intent intent = new Intent(context, GoodsTypeActivity.class);
        intent.putExtra("title",title);
        intent.putExtra("cateId",cateId);
        return intent;
    }

    @Override
    public void onLeftClick() {
        finish();
    }

    @Override
    public void onRightClick() {

    }

    @Override
    public void onEditTextClick() {

    }
}
